<template>
  <ul>
    <li v-for="(item, index) in gedan.playlists" :key="index">
      <router-link :to="`gedan?id=${item.id}&name=${item.name}`">
        <img :src="item.coverImgUrl" alt="" />
        <p class="nikename">{{ item.name }}</p>
      </router-link>
      <p class="twohang">
        <span>by</span
        ><router-link to="">{{ item.creator.nickname }}</router-link>
      </p>
    </li>
  </ul>
</template>

<script>
export default {
  props: {
    gedan: {
      type: Object,
    },
  },
  data() {
    return {
      gedanArr: [],
    };
  },
};
</script>

<style lang="less" scoped>
ul {
  width: 980px;
  display: flex;
  flex-wrap: wrap;
  margin-top: 20px;
}
li > a > img {
  width: 140px;
}
li {
  width: 140px;
  height: 204px;
  margin-left: 42px;
  margin-bottom: 30px;
  a {
    font-size: 14px;
    color: #000;
  }
}
p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.nikename {
  margin: 8px 0 3px;
}
.nikename:hover {
  text-decoration: underline;
}
.twohang {
  font-size: 12px;
  a {
    font-size: 12px;
  }
}
.twohang:hover a {
  text-decoration: underline;
}
</style>